package com.gxuwz.zhangjiahui.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxuwz.zhangjiahui.entity.College;
import com.gxuwz.zhangjiahui.entity.Student;
import com.gxuwz.zhangjiahui.mapper.CollegeMapper;
import com.gxuwz.zhangjiahui.mapper.StudentMapper;
import com.gxuwz.zhangjiahui.service.ICollegeService;
import com.gxuwz.zhangjiahui.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
@Service
public class CollegeServiceImpl extends ServiceImpl<CollegeMapper, College> implements ICollegeService {

    @Autowired
    private CollegeMapper collegeMapper;

    @Override
    public College findCollegeById(College college) {
        return collegeMapper.findCollegeById(college);
    }

    @Override
    public List<College> findCollegeAll() {
        return collegeMapper.findCollegeAll();
    }

    @Override
    public IPage<College> selectCollegePage(Page<College> page, Wrapper<College> wrapper) {
        return collegeMapper.selectCollegePage(page, wrapper);
    }

    @Override
    public void addCollege(College college) {
        collegeMapper.addCollege(college);
    }

    @Override
    public void updateCollegeById(College college) {
        collegeMapper.updateCollegeById(college);
    }

    @Override
    public void deleteCollegeById(College college) {
        collegeMapper.deleteCollegeById(college);
    }
}
